﻿using System;

using System.Collections.Generic;
using System.Text;
using Silvermoon.Controls;
using Silvermoon.Shapes;
using Silvermoon.OpenGL;
using System.Drawing;

namespace Silvermoon.Windows.Styles
{
    public class TitleDetailsImageItemStyle : Style
    {
        public Shape ImageBackground { get; set; }
        public FontSprite TitleFont { get; set; }
        public FontSprite DetailsFont { get; set; }
        public Color? ImageColor { get; set; }
        public Size? ImageSize { get; set; }
        public Margin Padding { get; set; }


        public override void Apply(Silvermoon.Controls.Control c)
        {
            base.Apply(c);
            TitleDetailsImageItem item = c as TitleDetailsImageItem;
            if (item != null)
            {
                if (ImageBackground != null) item.ImageBackground = ImageBackground.Clone();
                if (TitleFont != null) item.TitleFont = TitleFont;
                if (DetailsFont != null) item.DetailsFont = DetailsFont;
                if (ImageColor != null) item.ImageColor = ImageColor.Value;
                if (ImageSize != null) item.ImageSize = ImageSize.Value;
                if (Padding != null) item.Padding = Padding.Clone();
            }
        }
    }
}
